<?php use_helper('Form') ?>
<table class="statistike" cellspacing="0" cellpadding="0" border="1" width="700" style="border-collapse: collapse; empty-cells: show;">
  <?php if(count($skola_list) > 1){?>
  <tr>
    <th colspan="5">
      <form method="post" name="sel">
        <?php echo select_tag('skola_id', options_for_select($skola_list, $sf_request->getParameter('skola_id'))) ?>
        <button type="submit" class="button">Pregled</button>
      </form>
    </th>
  </tr>
  <?php }?>

  <tr>
    <th>Razred</th>
    <th>Članarina</th>
    <th>Test</th>
    <th>Socijala</th>
    <th>Kredit</th>
  </tr>

  <?php foreach($razreds as $razred){?>
  <tr>
    <th class="razred_link"><a id="<?php echo $razred->getId() ?>" href="javascript: void(0)" onclick="clanarinaDropTable(this.id, 'razred')"><?php echo $razred ?></a></th>
    <td><?php echo isset($clanarinas[$razred->getId()])?$clanarinas[$razred->getId()]:0 ?></td>
    <td><?php echo isset($tst_socs[$razred->getId()][0])?$tst_socs[$razred->getId()][0]:0 ?></td>
    <td><?php echo isset($tst_socs[$razred->getId()][1])?$tst_socs[$razred->getId()][1]:0 ?></td>
    <td><?php echo isset($kredits[$razred->getId()])?$kredits[$razred->getId()]:0 ?></td>
  </tr>
  <tr id="tr_razred_<?php echo $razred->getId() ?>" class="hide"><td id="razred_<?php echo $razred->getId() ?>" colspan="5"></td></tr>
  <?php }?>

  <tr>
    <th scope="row">Ukupno</th>
    <td><?php echo $clanarina_br ?></td>
    <td><?php echo $tst_soc_br['Test'] ?></td>
    <td><?php echo $tst_soc_br['Socijala'] ?></td>
    <td><?php echo $kredit_br ?></td>
  </tr>

  <tr>
    <th scope="row">Suma</th>
    <td colspan="4"><?php echo ($ukupna_suma) ? $ukupna_suma : 0 ?> Din.</td>
  </tr>
</table>
<input id="skola_id" type="hidden" value="<?php echo $sf_request->getParameter('skola_id') ?>" />